package com.longyou.comm.mapper;


import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.cloud.entity.LoginUserDetails;
import org.cloud.dimension.userinfo.LoginUserGetParamsDTO;
import org.springframework.stereotype.Repository;

import java.util.Map;

@Repository
public interface UserInfoMapper {

    LoginUserDetails getUserByNameForAuth(LoginUserGetParamsDTO loginUserGetParamsDTO) throws Exception;

    int insertIntoUserInfo(Map<String, ?> params) throws Exception;

    int updateLoginUserById(LoginUserDetails loginUserDetails) throws Exception;

    /**
     * 根据用户名获取用户ID
     *
     * @param username
     * @param userType
     * @return
     */
    Long selectUserIdByUsername(@Param("username") String username, @Param("userType") String userType);

    LoginUserDetails selectUserInfoByUsername(@Param("username") String username, @Param("userType") String userType);
}
